package lt.vin.exaatto.client.service;

import lt.vin.exaatto.shared.Chat;
import lt.vin.exaatto.shared.ChatAlreadyExists;
import lt.vin.exaatto.shared.NoSuchChatException;
import lt.vin.exaatto.shared.NotOwnerException;
import lt.vin.exaatto.shared.UserInformation;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

/**
 * The client side stub for the RPC service.
 */
@RemoteServiceRelativePath("chat")
public interface RpcService extends RemoteService {
	
	UserInformation getUserInformation();
	
	Chat createNewChat(String chatId) throws ChatAlreadyExists;
	
	void deleteChat(String chatId) throws NotOwnerException, NoSuchChatException;
	
	void addChatMember(String chatId, String member) throws NotOwnerException, NoSuchChatException;
	
	void addChatManager(String chatId, String manager) throws NotOwnerException, NoSuchChatException;
	
	void removeChatMember(String chatId, String member) throws NotOwnerException, NoSuchChatException;
	
	void removeChatManager(String chatId, String manager) throws NotOwnerException, NoSuchChatException;

}
